home *** CD-ROM | disk | FTP | other *** search
/ Sports Illustrated for Kids - Awesome Athletes! / Sports Illustrated for Kids - Awesome Athletes!.iso / shared.dir / 07580_WIN_VFW(new).ls < prev    next >
Encoding:
Text File  |  1996-04-18  |  2.3 KB  |  132 lines

  1. global gDVRect, gDVExitLock
  2.  
  3. on WIN_VFW_Init
  4.   mci("capability AVIVideo can play")
  5.   if the result = "true" then
  6.     set vRetValue to 1
  7.   else
  8.     set vRetValue to 0
  9.   end if
  10.   set gDVRect to EMPTY
  11.   return vRetValue
  12. end
  13.  
  14. on WIN_VFW_Done
  15. end
  16.  
  17. on WIN_VFW_Use aFName, aPal
  18.   set vHWnd to gSIUtils(mGetNamedWindowHdl, "Stage")
  19.   set gDVExitLock to the exitLock
  20.   set the exitLock to 0
  21.   mci("open " & aFName & ".avi type AVIVideo alias dvvid parent " & vHWnd & " style child")
  22.   put "ZZZUse" && the result
  23.   if aPal <> EMPTY then
  24.     mci("set video dvvid palette handle to " & aPal)
  25.   end if
  26.   set the exitLock to gDVExitLock
  27. end
  28.  
  29. on WIN_VFW_Play aFrom, aTo
  30.   global gDVFullScreen
  31.   set vCmd to "play dvvid from " & aFrom
  32.   if aTo <> -1 then
  33.     set vCmd to vCmd & " to " & aTo
  34.   end if
  35.   if gDVFullScreen then
  36.     set vCmd to vCmd & " fullscreen"
  37.   end if
  38.   mci("set dvvid video off")
  39.   mci("cue dvvid to " && aTo)
  40.   mci(vCmd)
  41.   put "ZZZPlay" && the result
  42.   if gDVRect <> EMPTY then
  43.     mci("put dvvid window at " & gDVRect)
  44.   end if
  45.   mci("set dvvid video on")
  46. end
  47.  
  48. on WIN_VFW_Pause
  49.   mci("pause dvvid")
  50. end
  51.  
  52. on WIN_VFW_PauseP
  53.   mci("status dvvid mode")
  54.   if the result = "paused" then
  55.     return 1
  56.   else
  57.     return 0
  58.   end if
  59. end
  60.  
  61. on WIN_VFW_Stop
  62.   mci("stop dvvid")
  63. end
  64.  
  65. on WIN_VFW_StopP
  66.   mci("status dvvid mode")
  67.   if the result = "Stopped" then
  68.     return 1
  69.   else
  70.     return 0
  71.   end if
  72. end
  73.  
  74. on WIN_VFW_Resume
  75.   mci("resume dvvid")
  76. end
  77.  
  78. on WIN_VFW_SetPos aPos
  79.   mci("seek dvvid to " & aPos)
  80. end
  81.  
  82. on WIN_VFW_GetPos
  83.   mci("status dvvid position")
  84.   return value(the result)
  85. end
  86.  
  87. on WIN_VFW_PlayP
  88.   mci("status dvvid mode")
  89.   if the result = "playing" then
  90.     return 1
  91.   else
  92.     return 0
  93.   end if
  94. end
  95.  
  96. on WIN_VFW_SetPlayArea aX, aY, aW, aH
  97.   set gDVRect to aX & " " & aY & " " & aW & " " & aH
  98. end
  99.  
  100. on WIN_VFW_FullScreen aFlag
  101.   global gDVFullScreen
  102.   set gDVFullScreen to aFlag
  103. end
  104.  
  105. on WIN_VFW_FullScreenP
  106.   global gDVFullScreen
  107.   return gDVFullScreen
  108. end
  109.  
  110. on WIN_VFW_FrameRate
  111.   mci("status dvvid nominal frame rate")
  112.   return value(the result) / 1000
  113. end
  114.  
  115. on WIN_VFW_Close
  116.   mci("close dvvid")
  117. end
  118.  
  119. on WIN_VFW_Idle
  120. end
  121.  
  122. on WIN_VFW_Show
  123.   mci("window dvvid state show")
  124.   mci("set dvvid video on")
  125. end
  126.  
  127. on WIN_VFW_Hide
  128.   mci("window dvvid state hide")
  129.   mci("set dvvid video off")
  130.   mci("window dvvid state hide")
  131. end
  132.